var express = require('express');
var router = express.Router();

/* GET users listing. */
// router.get('/', function(req, res, next) {
//   res.send('respond with a resource');
// });

router.post('/login', function (req, res) {
  const {username, password} = req.body
  console.log('register', username, password)
  if(username === "admin" && password === "asd"){
    res.send({code:0,data:user})
  }else{
    res.send({code:1,mes:"用户名或密码错误"})
  }
})

module.exports = router;
